<?php
namespace app\admin\controller;

use app\admin\services\AppointmentService;
use app\common\controller\Base;
use app\common\model\AppointmentFlow;
use think\Input;

class Appointment extends Base
{
    /**
     * @var AppointmentService
     */
    protected $_service;

    protected function _setService()
    {
        $this->_service = new AppointmentService();
    }

    public function setAuth()
    {
        return $this->commonData($this->_service->setAuth(Input::post()));
    }

    public function detail()
    {
        $id = Input::get('id') + 0;
        $this->assign('flows', AppointmentFlow::instance()->where(['appointment_id' => $id])->select());
        return parent::detail(); // TODO: Change the autogenerated stub
    }
}